package com.design.yjx.singleton;

public class Something {
    private Something() {
        System.out.println("initializer");
    }

    private static class LazyHolder {
        static final Something INSTANCE = new Something();
    }

    public static Something getInstance() {
        return LazyHolder.INSTANCE;
    }

    public static void main(String[] args) {
        Something s1 = Something.getInstance();
        Something s2 = Something.getInstance();

        System.out.println(s1.equals(s2));
    }
}